package com.openscorer;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

public class ScoreDisplay {
	Game game_;
	Scorable data_;
	double score_;
	TextView text_;
	ScoreDisplay(Context context, Game game, Scorable data) {
		game_ = game;
		data_ = data;
		text_ = new TextView(context);
	}
	
	public void updateScore() {
		Scorable data[] = new Scorable[1];
		data[0] = data_;
		score_ = game_.score(0, data);
		text_.setText(Double.toString(score_));
	}
	public View View() {
		return text_;
	}

}
